package com.okbihuo.perm.core.tool.api;

import lombok.*;

/**
 * @author Jr.November
 * 基础异常，用于全局异常处理，其余错误继承处理
 */
@Getter
@Builder
public class BaseException extends Exception {

    public BaseException(){

    }

    public BaseException(IResultCode code) {
        super(code.getMessage());
        this.code = code;
    }

    protected IResultCode code;

    public BaseException(IResultCode code, String message) {
        super(message);
        this.code = code;
    }
}
